package com.only4play.auth.security.authentication.admin.password;

import org.springframework.security.authentication.AuthenticationProvider;
import org.springframework.security.core.Authentication;
import org.springframework.security.core.AuthenticationException;
import org.springframework.stereotype.Component;

/**
 * @author zlm
 * @date 2024/1/24
 */
@Component
public class AdminPasswordProvider implements AuthenticationProvider {
  @Override
  public Authentication authenticate(Authentication authentication) throws AuthenticationException {
    //调用后台逻辑
    return null;
  }

  @Override
  public boolean supports(Class<?> authentication) {
    return AdminPasswordToken.class.isAssignableFrom(authentication);
  }
}
